package com.dayang.nm.ugcaudit.action;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

import com.dayang.baseplatform.model.CommonDisplay;
import com.dayang.baseplatform.model.UgcTask;
import com.dayang.baseplatform.service.CatalogListService;
import com.dayang.baseplatform.service.ugcaudit.AuditListService;

public class CatalogListAction extends BaseAction {

	@Override
	public String create(ActionMapping mapping, ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {

		return null;
	}

	@Override
	public String delete(ActionMapping mapping, ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		return null;
	}

	@Override
	public String update(ActionMapping mapping, ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {

		return null;
	}

	@Override
	public String read(ActionMapping mapping, ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {

		CatalogListService service = new CatalogListService();
		List catalogList = service.read();

		JSONArray json = JSONArray.fromCollection(catalogList);
		String jsonStr = json.toString();

		return jsonStr;
	}

	//tomato princess...

}
